import request from '@/utils/request'

/**
 * 图片上传
 * @returns
 */
export const fileUploadAPI = (file) => {
  const formData = new FormData()
  formData.append('file', file)

  return request({
    url: '/image',
    method: 'post',
    data: formData,
    headers: {
      'Content-Type': 'multipart/form-data',
    },
  })
}
